//
//  NotifcationCenters.swift
//  JXBaseTools
//
//  Created by godox on 2021/11/30.
//

import Foundation

public enum JXNotification: String {
    
    case notificationName
    
    public var notificationName: NSNotification.Name {
        return NSNotification.Name(self.rawValue)
    }
}


extension NotificationCenter: JXCompatible {}

extension JX where Base: NotificationCenter {
    
    ///发送
    public static func post(custom name: JXNotification, object: Any? = nil){
        
        NotificationCenter.default.post(name: name.notificationName, object: object)
    }
    
}
